<!DOCTYPE html>
<html lang="zh" xmlns:th="http://www.thymeleaf.org"
>
<head>
    <meta charset="UTF-8">
    <title>Title</title>
</head>
<body>
<div th:replace="~{fragments/header :: header}"></div>
<h3 th:text="${userModel.title}"></h3>
<a th:href="@{/users/form}">创建用户</a>|
<table>
    <thead>
    <tr>
        <td>ID</td>
        <td>Name</td>
        <td>Email</td>
        <td colspan="3">操作</td>
    </tr>
    </thead>
    <tbody>
    <tr th:if="${userModel.userList.size()} eq 0">
        <td colspan="6">暂无数据</td>
    </tr>
    <tr th:each="user : ${userModel.userList}">
        <td th:text="${user.id}">ID</td>
        <td th:text="${user.name}">Name</td>
        <td th:text="${user.email}">Email</td>
        <td><a th:href="@{'/users/'+${user.id}}">查看</a></td>
        <td><a th:href="@{'/users/modify/'+${user.id}}">修改</a></td>
        <td><a th:href="@{'/users/delete/'+${user.id}}">删除</a></td>
    </tr>
    </tbody>

</table>
<div th:replace="~{fragments/footer :: footer}"></div>
</body>
</html>